'use strict';

let
    Koa = require('koa'),
    bodyParser = require('koa-bodyparser'),
    port = 3030,
    con = require('./controllers'),
    model = require('./models'),
    temp = require('./templating'),
    sta = require('koa-static'),
    sequelize = require("./db/db"),
    session = require('./session'),
    app = new Koa();


app.use(bodyParser());

app.use(session(app));

app.use(sta(__dirname + '/statics'));

app.use(temp);

app.use(con());



(async () => {
    // await model.sync();
})();


app.listen(port, () => {
    console.log(`http://localhost:${port}`);
});
